class LightBrandTypeBean {
  LightBrandTypeBean({
    this.lampBrandCode,
    this.lampBrandName,
    this.brandDescr,
    this.country,
    this.website,
    this.contactName,
    this.contactEmail,
    this.contactPhone,
    this.logoUrl,
    this.establishmentYear,
    this.brandStatus,
    this.createTime,
    this.creatorId,
    this.creatorName,
    this.updateTime,
    this.updatorId,
    this.updatorName,
    this.baseLampTypes,
  });

  LightBrandTypeBean.fromJson(dynamic json) {
    lampBrandCode = json['lampBrandCode'];
    lampBrandName = json['lampBrandName'];
    brandDescr = json['brandDescr'];
    country = json['country'];
    website = json['website'];
    contactName = json['contactName'];
    contactEmail = json['contactEmail'];
    contactPhone = json['contactPhone'];
    logoUrl = json['logoUrl'];
    establishmentYear = json['establishmentYear'];
    brandStatus = json['brandStatus'];
    createTime = "${json['createTime']}";
    creatorId = json['creatorId'];
    creatorName = json['creatorName'];
    updateTime = json['updateTime'];
    updatorId = json['updatorId'];
    updatorName = json['updatorName'];
    if (json['baseLampTypes'] != null) {
      baseLampTypes = [];
      json['baseLampTypes'].forEach((v) {
        baseLampTypes?.add(BaseLampTypes.fromJson(v));
      });
    }
  }
  String? lampBrandCode;
  String? lampBrandName;
  String? brandDescr;
  String? country;
  String? website;
  String? contactName;
  String? contactEmail;
  String? contactPhone;
  String? logoUrl;
  String? establishmentYear;
  String? brandStatus;
  String? createTime;
  String? creatorId;
  String? creatorName;
  String? updateTime;
  String? updatorId;
  String? updatorName;
  List<BaseLampTypes>? baseLampTypes;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['lampBrandCode'] = lampBrandCode;
    map['lampBrandName'] = lampBrandName;
    map['brandDescr'] = brandDescr;
    map['country'] = country;
    map['website'] = website;
    map['contactName'] = contactName;
    map['contactEmail'] = contactEmail;
    map['contactPhone'] = contactPhone;
    map['logoUrl'] = logoUrl;
    map['establishmentYear'] = establishmentYear;
    map['brandStatus'] = brandStatus;
    map['createTime'] = createTime;
    map['creatorId'] = creatorId;
    map['creatorName'] = creatorName;
    map['updateTime'] = updateTime;
    map['updatorId'] = updatorId;
    map['updatorName'] = updatorName;
    if (baseLampTypes != null) {
      map['baseLampTypes'] = baseLampTypes?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

class BaseLampTypes {
  BaseLampTypes({
    this.lampTypeId,
    this.lampBrandCode,
    this.lampBrandName,
    this.lampTypeName,
    this.typePower,
    this.colorTemperature,
    this.luminousFlux,
    this.cri,
    this.beamAngle,
    this.attenuationRate,
    this.ratedLife,
    this.lampCheckPic,
    this.typeStatus,
    this.createTime,
    this.creatorId,
    this.creatorName,
    this.updateTime,
    this.updatorId,
    this.updatorName,
    this.typeDescription,
  });

  BaseLampTypes.fromJson(dynamic json) {
    lampTypeId = json['lampTypeId'];
    lampBrandCode = json['lampBrandCode'];
    lampBrandName = json['lampBrandName'];
    lampTypeName = json['lampTypeName'];
    typePower = json['typePower'];
    colorTemperature = json['colorTemperature'];
    luminousFlux = json['luminousFlux'];
    cri = json['cri'];
    beamAngle = json['beamAngle'];
    attenuationRate = "${json['attenuationRate']}";
    ratedLife = "${json['ratedLife']}";
    lampCheckPic = json['lampCheckPic'];
    typeStatus = json['typeStatus'];
    createTime = json['createTime'];
    creatorId = json['creatorId'];
    creatorName = json['creatorName'];
    updateTime = json['updateTime'];
    updatorId = json['updatorId'];
    updatorName = json['updatorName'];
    typeDescription = json['typeDescription'];
  }
  String? lampTypeId;
  String? lampBrandCode;
  String? lampBrandName;
  String? lampTypeName;
  String? typePower;
  String? colorTemperature;
  String? luminousFlux;
  String? cri;
  String? beamAngle;
  String? attenuationRate;
  String? ratedLife;
  String? lampCheckPic;
  String? typeStatus;
  String? createTime;
  String? creatorId;
  String? creatorName;
  String? updateTime;
  String? updatorId;
  String? updatorName;
  String? typeDescription;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['lampTypeId'] = lampTypeId;
    map['lampBrandCode'] = lampBrandCode;
    map['lampBrandName'] = lampBrandName;
    map['lampTypeName'] = lampTypeName;
    map['typePower'] = typePower;
    map['colorTemperature'] = colorTemperature;
    map['luminousFlux'] = luminousFlux;
    map['cri'] = cri;
    map['beamAngle'] = beamAngle;
    map['attenuationRate'] = attenuationRate;
    map['ratedLife'] = ratedLife;
    map['lampCheckPic'] = lampCheckPic;
    map['typeStatus'] = typeStatus;
    map['createTime'] = createTime;
    map['creatorId'] = creatorId;
    map['creatorName'] = creatorName;
    map['updateTime'] = updateTime;
    map['updatorId'] = updatorId;
    map['updatorName'] = updatorName;
    map['typeDescription'] = typeDescription;
    return map;
  }
}
